package oj.swing.common;

import java.io.*;

public class OJTabField implements Serializable {

  private String id, idField, idTable, validationMethod, valueDefault;
  private int    pos, length, labelSize;
  private boolean continuePrev, visible, mandatory, readOnly, useDefault;
  private OJField  field;
  //FMF-UpperCase==================//
  private boolean isUpperCase;
  //FMF-UpperCase==================/*/

  public OJTabField() {
    init();
  }

  public OJTabField(String newId) {
    init();
    setId(newId);
  }

  private void init() {
    id = "";
    idField = "";
    pos = -1;
    length = 0;
    labelSize = 0;
    field = new OJField();
    //FMF-UpperCase==================//
    isUpperCase = false;
    //FMF-UpperCase==================/*/
  }

  public void setId(String newId) {
    id = newId;
  }

  public void setIdField(String newId) {
    idField = newId;
  }

  public void setPosition(int newPos) {
    pos = newPos;
  }

  public void setLength(int newLength) {
    length = newLength;
  }

  public String getId() {
    return id;
  }

  public String getIdField() {
    return idField;
  }

  public int getPosition() {
    return pos;
  }

  public int getLength() {
    return length;
  }

  public void setValidationMethod(String method) {
    validationMethod = method;
  }

  public String getValidationMethod() {

    return validationMethod;
  }

  public void setValueDefault(String newValue) {
    valueDefault = newValue;
  }

  public String getValueDefault() {
    return valueDefault;
  }

  public void setContinuePrev(boolean cont) {
    continuePrev = cont;
  }

  public boolean isContinuePrev() {
    return continuePrev;
  }

  public void setVisible(boolean isVis) {
    visible = isVis;
  }

  public boolean isVisible() {
    return visible;
  }

  public void setMandatory(boolean isMandat) {
    mandatory = isMandat;
  }

  public boolean isMandatory() {
    return mandatory;
  }

  public void setReadOnly(boolean isRO) {
    readOnly = isRO;
  }

  public boolean isReadOnly() {
    return readOnly;
  }

  public void setUseDefault(boolean ud) {
    useDefault = ud;
  }

  public boolean isUseDefault() {
    return useDefault;
  }

  public String getIdTable() {
    return idTable;
  }

  public void setIdTable(String idTable) {
    this.idTable = idTable;
  }

  public OJField getField() {
    return field;
  }

  public void setField(OJField field) {
    this.field = field;
  }

  public int getLabelSize() {
    return labelSize;
  }

  public void setLabelSize(int labelSize) {
    this.labelSize = labelSize;
  }
  //FMF-UpperCase==================//
  public boolean isUpperCase() {
    return isUpperCase;
  }
  
  public void setUpperCase(boolean isUpperCase) {
    this.isUpperCase = isUpperCase;
  }
  //FMF-UpperCase==================/*/
}